package com.example.springcloudindex.web;

import org.springframework.web.bind.annotation.CookieValue;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
// 配置路径中不能有 zuul 关键字
@RequestMapping("demo")
public class ZuulAction {

    @RequestMapping("hello")
    String hello(){
        return "hello zuul";
    }

    @GetMapping("cookie")
    String headers(@CookieValue("Cookie") String cookie){
        return cookie;
    }
}
